
<template>
  <div class="menav">
    <div class="tou">
      <ul class="tb">
        <li
          v-for="(tabs, index) in bs"
          :key="index"
          @click="changeView(index)"
          :class="{ act: currentIndex === index }"
        >
          {{ tabs.bss }}
          <span :class="{ active: currentIndex === index }"></span>
        </li>
      </ul>
      <div class="xuan">
        <el-button type="primary">预览门户</el-button>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      currentIndex: 0,
      bs: [{ bss: '数据分析' }, { bss: '留言管理' }],
    }
  },
  created() {},
  methods: {
    changeView(index) {
      this.currentIndex = index
      this.$emit('gan', (this.currentIndex = index))
    },
  },
  computed: {
    currentTabComponent() {
      return this.arr[this.currentIndex]

      // return this.currentTab
    },
  },
}
</script>

<style lang='scss' scoped>
.menav {
      width: 100%;
  display: flex;
  flex-grow: 1;
  flex-wrap: wrap;
  .tou {
    margin-left: 17px;
    width: 100%;
    height: 57px;
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    border-bottom: 1px solid #F0F2F5;
    .tb {
      margin-left: 10px;
      font-size: 16px;
      font-family: PingFangSC, PingFangSC-Medium;
      font-weight: 500;
      height: 57px;
      width: 50%;
      list-style: none;
      display: flex;

      li {
        font-size: 14px;
        margin: 21px 60px 12px 0;
        line-height: 24px;
        width: 64px;
        height: 24px;
        color: #747474;
        .active {
          position: relative;
          margin: 0 auto;
          top: 9px;
          display: block;
          width: 46px;
          height: 2px;
          background: #4A4A4A;
          margin: 0 auto;
          right: 5px;
        }
      }
      .act{
         font-family: PingFangSC, PingFangSC-Semibold;
font-weight: 600;
text-align: left;
color: #131026;;
      }
    }
    .xuan {
      width: 50%;
      margin: 0 20px 0 0;
      height: 57px;
      text-align: right;
      line-height: 57px;
    }
  }
  
}
</style>
